﻿using System;
using System.ServiceModel;

namespace GroupChallenge.Web
{
    [ServiceContract]
    public interface IGroupChallenge
    {
        [OperationContract]
        FriendlyResult JoinGame(string nickName, string fullName, int playerId);

        [OperationContract]
        bool LeaveGame(string nickName);

        [OperationContract]
        string[] GetNickNameSuggestions();

        [OperationContract]
        void GetCurrentGameState(ref DateTime lastChangeTime, out Game currentGame, out Question currentQuestion);

        [OperationContract]
        void AnswerQuestion(string userNickName, int questionId, int answerId, out int correctAnswerId, out bool isFirstToAnswer);

        [OperationContract]
        FriendlyResult SubmitQuestion(string userNickName, Question newQuestion);
    }
}
